package com.cj.user.service.designpatterns.factory;

/**
 * @Author cheng jun
 * @Description: 形容词用接口，名词用抽象类
 * @Date 2021/7/14 17:41
 */
public class Main {

    public static void main(String[] args) {
        //FruitFactory apple = SimpleFactory.getInstance().createApple();
        FruitFactory apple = SimpleFactory2.INSTANCE.createApple();
        apple.eat();

        //FruitFactory banana = SimpleFactory.getInstance().createBanana();
        FruitFactory banana = SimpleFactory2.INSTANCE.createBanana();
        banana.eat();
    }
}
